NestJS does not await the return value of catch(). Send the HTTP response first, then fire-and-forget the async operation with a .catch() fallback to handle logging failures. Never await an async call before res.status().json() — doing so delays the HTTP response and can cause timeouts.
NestJS does not await the return value of catch() — async operations after sending the response are fire-and-forget.
Always call res.status().json() before any await — delaying it causes request timeouts.
Add a .catch() on the async log call so a logging failure does not throw an unhandled rejection.
For critical auditing that must not be lost, use a message queue (Redis, RabbitMQ) instead of a direct DB write.
Never make the HTTP response wait for the audit log — they are independent concerns.